package com.hf.lookatme.zpresenter;

import android.content.Context;

import com.hf.lookatme.zbean.GuessYourLikeData;
import com.hf.lookatme.zmodel.IModel_GuessYourLikeData;
import com.hf.lookatme.zmodel.impls.Model_GuessYourLikeData;
import com.hf.lookatme.zmodel.loadlistener.OnLoadGuessYourLikeDataListener;
import com.hf.lookatme.zview.interfaces.IView_Activity_GuessYourLike;
import com.orhanobut.logger.Logger;

import java.util.List;

/**
 * 描述：
 * 创建人：JoeShiguang
 * 创建日期：2015/6/26
 * 修改人：
 * 修改日期：
 *
 * @Version 1.0
 */
public class Present_Activity_GuessYourLike implements OnLoadGuessYourLikeDataListener{

  private IView_Activity_GuessYourLike iView;

  private IModel_GuessYourLikeData iModel_guess;

  public Present_Activity_GuessYourLike(IView_Activity_GuessYourLike iView) {
    this.iView = iView;
    this.iModel_guess = new Model_GuessYourLikeData();
  }

  public void getGuessDataAndInitGuessListView(Context context){
    iModel_guess.getGuessYourLikeData(context, this);
  }

  @Override
  public void onLoadGuessDataSuccess(List<GuessYourLikeData> list_guessData) {
    iView.initGuessList(list_guessData);
  }

  @Override
  public void onLoadGuessDataFailed(String failedInfo) {
    Logger.e(failedInfo);
  }
}
